package com.kt.NetworkModel.utils;

import android.util.Log;

/**
 * Created by admin on
 * 2018/8/21.
 * content
 */
public class MLog {
    public static final String TAG = "okgo";

    private static boolean LOG_OPEN = true;

    public MLog() {
        super();
    }

    /**
     * 设置当前是否打开 log 日志
     *
     * @param printLog
     */
    public static void setOpenLog(boolean printLog) {
        LOG_OPEN = printLog;
    }

    public static void d(String value) {
        if (value != null && LOG_OPEN) {
            Log.e(TAG, value + "");
//            LogUtils.d(value + "");
        }
    }

    public static void e(Object value) {
        if (value instanceof String && LOG_OPEN) {
            Log.e(TAG, value + "");
        }

    }

    public static void tag(Object value) {
        Log.d("tag", value + "");
    }

    public static void d(String tag, String value) {
        if (LOG_OPEN) {
            Log.d(tag, "" + value);
        }
    }
}
